<template>
  <div>
    <h3>Home</h3>
    <div>
        <!-- 
            注意事项:
                -to的对象写法中,如果和params一起使用,则不能书写payh,只能使用name
                -可选的params参数,要么不写,要么写一个undefined作为值,不能书写一个空字符串
         -->

        <router-link :to="{name:'music',params:{id:'1',time:'4min'}}">华语music</router-link>
        <router-link :to="{name:'music',params:{id:'2'}}">粤语music</router-link>
        <router-link :to="{name:'music',params:{id:'3',time:'3min'}}">英语music</router-link>

        
        <router-link :to="{name:'news'}">news</router-link>

        <router-link to="/home/games?tit=qqfeiche&vers=2018">游戏1</router-link>

        <router-link :to="{
            path:'/home/games',
            query:{
                tit:'baolimotu',
                vers:'2009'
            }
        }">游戏2</router-link>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
    name:'Home',
}
</script>

<style>
</style>